<!DOCTYPE html>

<html style="height:100%">
    <head>
        <title>系统登录</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

      

        <link rel="stylesheet" type="text/css" href="../resource/js/easyui/themes/default/easyui.css">
        <link rel="stylesheet" type="text/css" href="../resource/js/easyui/themes/icon.css">
        <link rel="stylesheet" type="text/css" href="../resource/js/easyui/themes/color.css">
        
            <script src="../resource/js/easyui/jquery.min.js" type="text/javascript"></script>
        <script src="../resource/js/easyui/jquery.easyui.min.js" type="text/javascript"></script>
        <!-- <script src="../resource/js/easyui/easyloader.js" type="text/javascript"></script>-->   
        <script src="../resource/js/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
        <script src="../resource/js/jquery.cookie.js" type="text/javascript"></script>
        <script>
            function submitForm(){
                 $('#login').form('submit',{
                       success: function(data){
		var data = eval('(' + data + ')'); // change the JSON string to javascript object
		if (!data.success){
		            $.messager.alert("警告",data.msg,"Alert");
		}else{
                                               
                                               $.cookie('loginId',$('#loginId').textbox('getValue'),{path:'/'});
                                               document.location = "../index.html";
                                             }
                   }
});
               
            }
            function clearForm(){
                 $('#login').form('clear');
            }
            
            </script>
            
    </head>
    
    <body style="width:100%;height:100%;display: flex;align-items: center; justify-content: center; background: url(../resource/images/loginbg2.jpg) ;background-repeat:no;background-size:cover;"  >
     
         <div class="easyui-panel" title="登录系统" style="width:100%;max-width:400px;padding:30px 60px;">
        <form id="login" method="get" action="../api/login" >
            <div style="margin-bottom:20px">
                <input class="easyui-textbox" id="loginId" name="loginId" style="width:100%" data-options="label:'用户名',required:true">
            </div>
            <div style="margin-bottom:20px">
                <input class="easyui-passwordbox" name="passwd" style="width:100%" data-options="label:'密码',required:true">
            </div>
           
        </form>
        <div style="text-align:center;padding:5px 0">
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()" style="width:80px">登录</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()" style="width:80px">清除</a>
        </div>
    </div>
    </body>
</html>
